import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class ExceptionTest1 {
    public static void main(String[] args) throws IOException {
        final var i = get();
        System.out.println(i);
        function();
        FileReader fr=new FileReader("D:\\VisioParseLog.txt");
        System.out.println(fr.read());
        function2();


    }
    public static int get(){
        return 10/3;
    }
    public static void function(){
        int[] arr={11,22,33};
        System.out.println(arr[2]);
    }
    public static void function2(){
//        java.lang.OutOfMemoryError 堆内存异常,这个是error级别异常
        int[] arr=new int[Integer.MAX_VALUE];
        System.out.println(arr);
    }

}
